
<?php include_once 'common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once 'common/account_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
		<strong>贷款管理</strong> &gt;&gt; 回款
		</div>
		<div class="admin_right_con">
			
			<table border="0" cellspacing="1" cellpadding="0">
			  <tr style="color:#0068b7;">
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>用户编号</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>用户名称</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>所属客服</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>期数</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>借款标题</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>还款金额</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>还款状态</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>估计还款时间</strong></td>
			  </tr>
			  <?php if($list){?>
			  <?php foreach($list as $key=>$borrow){?>
			  <tr>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $borrow['user_id'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $borrow['username'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $kefu_list[$borrow['kefu_userid']]['username'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo ($borrow['forder']+1).'/'.$borrow['time_limit'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $borrow['title'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($borrow['money'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $borrow_collection_status[$borrow['fstatus']];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php if($borrow['repay_time'] == 0){echo "";}else{echo date('Y-m-d H:i',$borrow['repay_time']);}?></td>
			  </tr>
			  <?php }?>
			  <?php }?>
			   <tr>
			  	<td colspan="11" align="right" bgcolor="#FFFFFF">
			  		<form action="/ychadmin/accountrecharge/received_payments/" method="get">
			  			用户名称：<input type="text" id="username" name="username" style="width: 100px;" value="<?php echo $username?>" />
			  			所属客服：<input type="text" id="kefu_username" name="kefu_username" style="width: 100px;" value="<?php echo $kefu_username?>" />
			  			状态：<select id="fstatus" name="fstatus">
			  				<option value="-1" <?php if($fstatus==-1){?>selected="selected"<?php }?>>所有</option>
			  				<?php foreach($borrow_collection_status as $key=>$value){?>
			  				<option value="<?php echo $key?>" <?php if($fstatus==$key){?>selected="selected"<?php }?>><?php echo $value;?></option>
			  				<?php }?>
			  			</select>
			  			是否内部账号：<select id="is_self" name="is_self">
			  				<option value="-1" <?php if($is_self==-1){?>selected="selected"<?php }?>>所有</option>
			  				<?php foreach($user_self as $key=>$value){?>
			  				<option value="<?php echo $key?>" <?php if($is_self==$key){?>selected="selected"<?php }?>><?php echo $value;?></option>
			  				<?php }?>
			  			</select>
			  			时间：<input type="text" id="start_repay_time" name="start_repay_time" style="width: 100px;" value="<?php echo $start_time;?>"  onfocus="WdatePicker()" />-----
			  			<input type="text" id="end_repay_time" name="end_repay_time" style="width: 100px;" value="<?php echo $end_time;?>"  onfocus="WdatePicker()" />
			  			<input type="submit" value="查询" style=" width:36px;" />
			  		</form>
			  	</td>
			  </tr>
			  <tr>
			  	<td height="35"  colspan="11" align="right" bgcolor="#FFFFFF">
			  		<a href="/ychadmin/accountrecharge/received_payments_excel?username=<?php echo $username?>&kefu_username=<?php echo $kefu_username?>&fstatus=<?php echo $fstatus?>&is_self=<?php echo $is_self?>&start_repay_time=<?php echo $start_time;?>&end_repay_time=<?php echo $end_time;?>">导出数据</a></td>
			  </tr>
			  <tr>
			  	<td colspan="12"  height="35" align="center" valign="middle" bgcolor="#FFFFFF" class="page">总预还金额：<font style="color:#e40011"><?php echo $totalmoney;?>元</font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $this->pagination->create_links();?>共<?php echo $count;?>条记录</td>
			  </tr>
			</table>
			
			</div>
	</div>
</div>
</body>
</html>
